<h1>Listing vips</h1>

<table>
  <tr>
    <th>name</th>
    <th>hoster</th>
    <th>IP</th>
    <th>port</th>
  </tr>

<% for vip in @vips %>
  <tr class=<%= cycle('row_odd','row_even')%> >

    <td>
      <%= link_to '[X]', vip, :confirm => 'Are you sure?', :method => :delete %>
      <%= link_to vip.asset.name, edit_vip_path(vip) %>
    </td>
    <td><%=h vip.hoster.name rescue nil%></td>
    <td><%= h vip.interface.ip_to_string rescue nil%></td>
    <td><%=h vip.port %></td>    
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New vip', new_vip_path %>
